-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extend and fix data url imports #534
extend and fix data url imports #534
Conversation
romainmenke
commented
Jul 20, 2023
•
edited
Loading
edited
- add support for url encoded data urls
- fix handling of embedded relative imports
@@ -1,24 +1,6 @@ | |||
p { color: green; } | |||
@import url(foo.css);p { color: green; }p { color: blue; }@media (min-width: 320px){@layer foo{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a data url eventually unfurls into a regular import with a relative path it should stop and must not inline the relative import.
Each import is resolved relatively to it's parent and when the parent is a data url there isn't any domain or base url to resolve a url against.
I think usage of data urls was already very niche and that it is extremely unlikely that anyone depends on the old behavior.
…-url-imports--adventurous-uakari-79de749a0a
lib/parse-styles.js
Outdated
if (dataURL.isValid(stmt.from)) { | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps leave a comment on what we're doing here, and why? Won't be obvious to our future selves.
Thank you for the review 🙇 |